package answer.service.Impl;

import answer.mapper.LogMapper;
import answer.service.LogService;
import commons.pojo.Log;
import commons.vo.LivegoodsResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LogServiceImpl implements LogService {
    @Autowired
    private LogMapper logMapper;
//    @Override
//    public LivegoodsResult selectLog(int id) {
//        QueryWrapper<Log> collectionQueryWrapper = new QueryWrapper<>();
//        collectionQueryWrapper.eq("user", id);
//        List<Log> logs = logMapper.selectList(collectionQueryWrapper);
//        return LivegoodsResult.ok(logs);
//    }

    @Override
    public LivegoodsResult saveLog(Log log) {

        logMapper.insert(log);
        return LivegoodsResult.ok("存入日志");
    }
}
